package com.yjian.dao.bean;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * Created by xuxiaobao on 2017/9/27.
 */
public class Member {
    private Long id;
    private String mid;
    @JsonIgnore
    private String uid;
    private String phone;
    private String username;
    private Double balance;
    private Integer number;
    private Long createTime;

    @JsonIgnore
    private String query_sql;
    @JsonIgnore
    private Integer offSet;
    @JsonIgnore
    private Integer pageSize;

    public void initQuerySql(boolean mid, boolean uid, boolean phone, boolean username,
                             boolean balance, boolean number, boolean createTime) {
       StringBuilder sb = new StringBuilder();
       sb.append("id,");
       if (mid) sb.append("mid,");
       if (uid) sb.append("uid,");
       if (phone) sb.append("phone,");
       if (username) sb.append("username,");
       if (balance) sb.append("balance,");
       if (number) sb.append("number,");
       if (createTime) sb.append("createTime,");
       sb.replace(sb.lastIndexOf(","), sb.length(), "");
       query_sql = sb.toString();
    }
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMid() {
        return mid;
    }

    public void setMid(String mid) {
        this.mid = mid;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public String getQuery_sql() {
        return query_sql;
    }

    public Integer getOffSet() {
        return offSet;
    }

    public void setOffSet(Integer offSet) {
        this.offSet = offSet;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }
}
